<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>add-土地录入</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script type="text/javascript" src="../frame/assets/js/lib/jquery.min.js"></script>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="../frame/layui/lay/modules/layer.js"></script>
    <link rel="stylesheet" href="../frame/layui/lay/modules/layer/default/layer.css">
    <link rel="stylesheet" href="../frame/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="../frame/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/font-awesome.min.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/themify-icons.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/unix.css">
    <link rel="stylesheet" href="../frame/assets/css/style.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/menubar/sidebar.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/sweetalert/sweetalert.css">
    <style>
        .dd{
            color:#ff0000;
            padding-left:30px;
            front-size:15px;
        }
    </style>
</head>

<body style="margin-left:25%;height: 1200px;">
<!--内容-->
<div class="content-wrap" >
    <div class="main">
        <div class="container-fluid">
            <!--欢迎栏-->
            <div class="row">
                <div class="col-lg-8 p-r-0 title-margin-right">
                    <div class="page-header">
                        <div class="page-title">
                            <h1>水资源录入</h1>

                        </div>
                    </div>
                </div>
            </div>

            <h4><i class="layui-icon layui-icon-face-smile" style="font-size: 30px; color: #1E9FFF;"></i>  添加水资源</h4><br><br>
            <div class="layui-text" style="font-size:18px">
                <label>流域：</label>
                <input type="text" name="liuyu" id="liuyu" >
                <div class="dd" id="p1">
                </div>
                <br><br>
                <label>行政区ID：</label>
                <input type="text" name="username" id="username" >
                <div class="dd" id="p2">
                </div>
                <br><br>
                <label>库名：</label>
                <input type="kuname" name="urban" id="kuname" >
                <div class="dd" id="p3"></div>
                <br><br>
                <label>库水位（米）：</label>
                <input type="text" name="rongliang" id="rongliang" >
                <div class="dd" id="p4">
                </div>
                <br><br>
                <label>蓄水量（万立方米）：</label>
                <input type="text" name="xushui" id="xushui" >
                <div class="dd" id="p5">
                </div>
                <br><br>
                <label>日平均水位：</label>
                <input type="text" name="dayaverge" id="dayaverge" >
                <div class="dd" id="p6"></div>
                <br><br>
                <label>最高水量：</label>
                <input type="text" name="dayhigh" id="dayhigh" >
                <div class="dd" id="p7">
                </div>
                <br><br>
                <label>最大下泄流量：</label>
                <input type="text" name="maxfall" id="maxfall" >
                <div class="dd" id="p8">
                </div>
                <br><br>
                <label>输水洞：</label>
                <input type="text" name="hole" id="hole" >
                <div class="dd" id="p9"></div>
                <br><br>

                <input type="submit" id="submit" onclick="submitp()">
            </div>
        </div>
    </div>
</div>
<!--搜索-->
<div id="search">
    <button type="button" class="close">×</button>
    <form>
        <input type="search" value="" placeholder="type keyword(s) here" />
        <button type="submit" class="btn btn-primary">Search</button>
    </form>
</div>
</body>
<script src="../frame/assets/js/lib/jquery.nanoscroller.min.js"></script>
<script src="../frame/assets/js/lib/menubar/sidebar.js"></script>
<script src="../frame/assets/js/lib/bootstrap.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/datatables.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/dataTables.buttons.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.flash.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/jszip.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/pdfmake.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/vfs_fonts.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.html5.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.print.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/datatables-init2.js"></script>
<script src="../frame/assets/js/lib/sweetalert/sweetalert.min.js"></script>
<script src="../frame/assets/js/lib/sweetalert/zhuxiao.js"></script>

<script type="text/javascript">
    function submitp(){
        var liuyu=$("#liuyu").val();
        var username=$("#username").val();
        var kuname=$("#kuname").val();
        var rongliang=$("#rongliang").val();
        var xushui=$("#xushui").val();
        var dayaverge=$("#dayaverge").val();
        var dayhigh=$("#dayhigh").val();
        var maxfall=$("#maxfall").val();
        var hole=$("#hole").val();
        $.ajax({
            type:'get',
            url:"/addwater",
            contentType:'application/json;charset=utf-8',
            dataType:'html',
            data:{
                'liuyu':liuyu,
                'username':username,
                'kuname':kuname,
                'rongliang':rongliang,
                'xushui':xushui,
                'dayaverge':dayaverge,
                'dayhigh':dayhigh,
                'maxfall':maxfall,
                'hole':hole
            },
            success:function(res){
                layer.msg("添加成功!");
                alert("成功");
            },
            error:function(res){
                layer.msg("添加失败！");
                alert("失败");
            }
        })
    }

</script>
</html>
